#ifndef TESTSTATE_H
#define TESTSTATE_H

#include "Singleton.h"
#include "GameState.h"
#include "ObjMeshManager.h"
#include "Vec3.h"
#include "EventPoller.h"
#include "EventHandler.h"
#include "Sound.h"
#include "Text.h"

#include "../Bullet/src/btBulletDynamicsCommon.h"

class TestState : public Uncopyable, public GameState, public EventHandler
{
	TestState();
	friend class Singleton<TestState>;
public:
	~TestState();
	virtual void Update();
	virtual void Draw();
	virtual void OnActivated();
	virtual void OnDeactivated();
	
	virtual void OnKeyDownEvent(const WPARAM& event);
	virtual void OnMouseMotionEvent(const LPARAM& event);
	virtual void OnMouseButtonDownEvent(const MSG& event) override;
	virtual void OnMouseButtonUpEvent(const MSG& event) override;

	void GetAxisArray(Vec3f axis[]);
	void SetSound(const std::string& filePath);
	void SaveSound(const std::string& fileName);

	D3DXVECTOR2 GetMousePos()
	{
		return D3DXVECTOR2(m_mouseX, m_mouseY);
	}

private:
	float m_rotCrateAngle;
	Vec3f axis[15];

	float m_mouseX;
	float m_mouseY;
	bool m_mouseDown;
	
	Sound m_sound;
	Text m_sampleSounds;
	Text m_soundModifiers;
	Text m_controllers;

	bool m_showOverlay;
};

typedef Singleton<TestState> TheTestState;

#endif